import request from "@/utils/request";

export function getStudentList(params: any) {
    return request({
        url: `/api/student/list`,
        method: 'get',
        params: params
    });
}

export function getStudentById(id: number) {
    return request({
        url: `/api/student/getStudentInfo/${id}`,
        method: 'get',
    });
}

export function createStudent(data: any) {
    return request({
        url: `/api/student/createStudent`,
        method: 'post',
        data: data
    });
}

export function updateStudent(data: any) {
    return request({
        url: `/api/student/updateStudentInfo`,
        method: 'put',
        data: data
    });
}

export function deleteStudent(id: number) {
    return request({
        url: `/api/student/${id}`,
        method: 'delete',
    });
}
